/**
 * 
 */
package com.youxin.cpcenter.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.youxin.busfoundation.bean.BaseRequestBean;
import com.youxin.busfoundation.bean.ResponseObject;
import com.youxin.busfoundation.bean.ent.ResponseAccountBean;
import com.youxin.busfoundation.bean.login.UserInfo;
import com.youxin.busfoundation.common.LoginAuth;
import com.youxin.cpcenter.bean.RequestTryoutList;
import com.youxin.cpcenter.common.log.LogMethod;
import com.youxin.cpcenter.model.TbEntMemberIdentifyCapital;
import com.youxin.cpcenter.service.RechargeService;
import com.youxin.cpcenter.service.TryoutService;
import com.youxin.foundation.utils.ObjectUtils;

/**
 * @author yingde.cao
 * @date 2017年12月18日
 * @version 1.0
 */
@RestController
public class TryoutController extends BaseController{
	
	@Autowired
	private TryoutService tryoutService;
	/**
	 * 余额查询
	 * @description 
	 * @param request 
	 * @param httpServletResponse 
	 * @param bean 
	 * @return
	 */
	@LogMethod(id="ent.account.tryout.list",eventContent={})
	@RequestMapping(value = "/api/account/tryout/list", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseObject listAccount(HttpServletRequest request, HttpServletResponse httpServletResponse,
			@RequestBody RequestTryoutList bean) {
		try {			
			ObjectUtils.requestNonNull(bean, "参数不能为空");		
			
			return  tryoutService.list(bean);
		} catch (Exception e) {
			logger.error("/api/account/tryout/list异常", e);
			return ResponseObject.systemError(e);
		}
	}
}
